package com.cpecc.manager.wuzi;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cpecc.dao.wuzi.ShenQingDao;
import com.cpecc.model.system.Dep;
import com.cpecc.model.system.User;
import com.cpecc.model.wuzi.ShenQing;
import com.cpecc.model.wuzi.WuZi;

@Service
@Transactional
public class ShenQingManager {

	@Autowired
	private ShenQingDao shenQingDao;
	
	public void save(ShenQing shenQing){
		shenQingDao.save(shenQing);
	}
	
	public List<ShenQing> getMyShenQing(User user){
		return shenQingDao.getMyShenQing(user);
	}
	
	public List<ShenQing> getAllInDep(Dep dep){
		return shenQingDao.getAllInDep(dep);
	}
	
	public ShenQing get(String id){
		return shenQingDao.get(id);
	}
	
	public boolean cover(ShenQing shenQing){
		return shenQingDao.cover(shenQing);
	}
	
	public List<ShenQing> getAllCaiGouZT(int zhuangT){
		return shenQingDao.getAllCaiGouZT(zhuangT);
	}
	
	public List<ShenQing> getAllCaiGouZT2CMR(int zhuangT, User user){
		return shenQingDao.getAllCaiGouZT2CMR(zhuangT, user);
	}
	
	public List<ShenQing> getAllYanShouRK(){
		return shenQingDao.getAllYanShouRK();
	}
	
	public ShenQing getShenQingForWuZi(WuZi wuZi){
		return shenQingDao.getShenQingForWuZi(wuZi);
	}
	
	public List<ShenQing> getAllLingYong(User user){
		return shenQingDao.getAllLingYong(user);
	}
	
	public boolean hasLiuCheng(User user){
		return shenQingDao.hasLiuCheng(user);
	}
	
	public List<ShenQing> getShenQing(User user){
		return shenQingDao.getShenQing(user);
	}
	
	public boolean cheHui(String id){
		return shenQingDao.cheHui(id);
	}
	
	public List<ShenQing> activeShenQing(){
		return shenQingDao.activeShenQing();
	}

	public boolean delete(String id) {
		return shenQingDao.delete(id);
	}
}
